package com.jf.yytgd.converter;

import com.jf.yytgd.entity.bean.Diary;
import com.jf.yytgd.entity.dto.diary.DiaryPublishDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * Created with IntelliJ IDEA
 * Description: 日记转换器
 * User:22954
 * Date:2025-02-09
 * Time:16:56
 */
@Mapper
public interface DiaryConverter {
    DiaryConverter INSTANCE = Mappers.getMapper(DiaryConverter.class);

    @Mapping(source = "text", target = "diaryBlob.text")
    Diary toBean(DiaryPublishDTO diaryDTO);
}
